Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rom_ctrl, dv] Conditional coverage hole inside the adapter #25482

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

KinzaQamar
Copy link
Contributor

There is a removal of an item (reqfifo_rvalid) to remove the conditional coverage hole 1011. If reqfifo_rvalid is 0, then we won't see d_valid.

@KinzaQamar KinzaQamar requested a review from rswarbrick December 3, 2024 08:53
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with the change, but can we expand the reasoning in the commit message a bit? (to explain it for people who weren't working through it with us!)

My reasoning: The only ways that d_valid can set to true require reqfifo_rvalid to be true (checked on line 282).

@KinzaQamar KinzaQamar force-pushed the tlul_adapter_sram_rtl branch from dee3ec6 to 81a875e Compare December 8, 2024 11:21
Copy link
Contributor

@rswarbrick rswarbrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good to me: thanks.

@rswarbrick
Copy link
Contributor

CHANGE AUTHORIZED: hw/ip/tlul/rtl/tlul_adapter_sram.sv

Copy link
Contributor

@andreaskurth andreaskurth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that the logical implication d_valid requires reqfifo_rvalid holds in the current implementation, based on lines 282 to 292 of tlul_adapter_sram.sv. Thus reqfifo_rvalid in d_valid & reqfifo_rvalid is redundant and can be removed.

Maybe we break this implication in the future, though, so I think it would be valuable to add an assertion for this as we prune the logical AND above. If that makes sense to you, could you please expand your commit?

@KinzaQamar KinzaQamar force-pushed the tlul_adapter_sram_rtl branch 3 times, most recently from 58ef1aa to d67c796 Compare December 10, 2024 17:03
@KinzaQamar KinzaQamar force-pushed the tlul_adapter_sram_rtl branch from d67c796 to e6202e8 Compare December 11, 2024 10:07
@andreaskurth
Copy link
Contributor

CHANGE AUTHORIZED: hw/ip/tlul/rtl/tlul_adapter_sram.sv

No functional change, as ensured by the newly added assertion

** There is a removal of an item (reqfifo_rvalid) from the conditional statement to
   deduct coverage hole 1011 for rom_ctrl .We can't see dvalid & !reqfifo_rvalid.
   Reason being if d_valid is true then reqfifo_rvalid must be true. Similarly, if
   reqfifo_rvalid is false, then we can't see d_valid high.

** An assertion is added for the d_valid -> reqfifo_rvalid to make sure that it
   can never be true for the adapter.

Signed-off-by: Kinza Qamar <[email protected]>
@KinzaQamar KinzaQamar force-pushed the tlul_adapter_sram_rtl branch from ae9a192 to 34bf831 Compare December 12, 2024 10:05
@KinzaQamar KinzaQamar changed the title [rom_ctrl, rtl] Conditional coverage hole [rom_ctrl, dv] Conditional coverage hole inside the adapter Dec 12, 2024
@rswarbrick rswarbrick merged commit 37fc765 into lowRISC:master Dec 12, 2024
22 of 23 checks passed
@KinzaQamar KinzaQamar deleted the tlul_adapter_sram_rtl branch December 18, 2024 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants